{/include file="simpla/common/header.html"/}
{/include file="simpla/common/left.html"/}
<div id="main-content">
  <h2>欢迎您 {/$_adminname/}</h2>
  <p id="page-intro">进货统计。可以查看您的进货量！</p>
  <div class="clear"></div>
  <div class="content-box">
    <div class="content-box-header">
      <h3>进货数据统计</h3>
      <div class="clear"></div>
    </div>
    <script src="{/$root_dir/}/assets/js/bootstrap/bootstrap-transition.js"></script>
    <script src="{/$root_dir/}/assets/js/bootstrap/bootstrap-alert.js"></script>
    <script src="{/$root_dir/}/assets/js/bootstrap/bootstrap-modal.js"></script>
    <script src="{/$root_dir/}/assets/js/bootstrap/bootstrap-dropdown.js"></script>
    <script src="{/$root_dir/}/assets/js/bootstrap/bootstrap-scrollspy.js"></script>
    <script src="{/$root_dir/}/assets/js/bootstrap/bootstrap-tab.js"></script>
    <script src="{/$root_dir/}/assets/js/bootstrap/bootstrap-tooltip.js"></script>
    <script src="{/$root_dir/}/assets/js/bootstrap/bootstrap-popover.js"></script>
    <script src="{/$root_dir/}/assets/js/bootstrap/bootstrap-button.js"></script>
    <script src="{/$root_dir/}/assets/js/bootstrap/bootstrap-collapse.js"></script>
    <script src="{/$root_dir/}/assets/js/bootstrap/bootstrap-carousel.js"></script>
    <script src="{/$root_dir/}/assets/js/bootstrap/bootstrap-typeahead.js"></script>
    <!--echarts demo-->
    <script src="{/$root_dir/}/assets/js/bootstrap/esl/esl.js"></script>
<script>
        require.config({
            packages: [
                {
                    name: 'echarts',
                    location: '{/$root_dir/}/assets/js/echarts',
                    main: 'echarts'
                },
                {
                    name: 'zrender',
                    //location: 'http://ecomfe.github.io/zrender/src',
                    //location: '../../../zrender/src',
                    location:'{/$root_dir/}/assets/js/zrender/src',
                    main: 'zrender'
                }
            ]
        });
        
        var option = {
     title : {
        text: '{/$title/}',
        subtext: '{/$start/} - {/$end/}'
    },
	           tooltip : {
                trigger: 'axis'
            },
            legend: {
                data:['{/$legend/}']
            },
            toolbox: {
                show : true,
                feature : {
                    mark : true,
                    //dataView : {readOnly: false},
                    magicType:['line', 'bar'],
                    restore : true,
                    saveAsImage : true
                }
            },
            calculable : true,
            xAxis : [
                {
                    type : 'category',
                    data : [{/$linedate/}]
                }
            ],
            yAxis : [
                {
                    type : 'value',
                    splitArea : {show : true}
                }
            ],
            series : [
                {
                    name:'{/$legend/}',
                    type:'bar',
					 itemStyle: {normal: {areaStyle: {
              		  color: 'rgba(30, 144, 255, 0.2)'
         			   }}},
                    data:[{/$linevalue/}]
                }
            ]
        };
        
        require(
            [
                'echarts',
                'echarts/chart/line',
                'echarts/chart/bar'
            ],
            function(ec) {
                var myChart = ec.init(document.getElementById('main'));
                myChart.setOption(option);
            }
        )
</script>
    <div class="content-box-content">
      <div class="tab-content default-tab" id="tab1">
      	<div class="form">
            <form action="{/get_url rule='/statistics/sales'/}" method="post" id="js-form">
                <fieldset class="clearfix">
               	  <p>时间：<input type="text"  name="start" onclick="WdatePicker({dateFmt:'yyyy-MM-dd'})"  class="text-input min-input" value="{/$start/}"/>--<input type="text"  name="end" onclick="WdatePicker({dateFmt:'yyyy-MM-dd'})"  class="text-input min-input" value="{/$end/}"/>&nbsp;<input type="submit" name="" class="button" id="button" value=" 查询 " /></p>
                </fieldset>
            </form>
        </div>
        <div id="main" style="height:540px; width:100%;"></div>
      </div>
    </div>
  </div>
  {/include file="simpla/common/copy.html"/} </div>
{/include file="simpla/common/footer.html"/}